package lab02.test12;
public class Circle extends Shape {
    //属性：半径,周长，面积
    double radius;
    double area;
    double perimeter;
    //行为：圆的面积与周长,重写求面积及周长的功能
    @Override
    void area(){
        System.out.println("圆的面积");
    }
    @Override
    void  perimeter(){
        System.out.println("圆的周长");
    }

    public double getArea() {
        return 3.14*radius*radius;
    }

    public double getPerimeter() {
        return 2*3.14*radius;
    }
}
